package com.afterRain.admin.controller;

import com.afterRain.commonly.CommonlyRecord;
import com.afterRain.model.Admin;
import com.afterRain.model.UserFile;
import com.jfinal.core.Controller;

/**
* @author 作者 E-mail:
* @version 创建时间：2017年6月9日 上午10:37:28
* 类说明
*/
public class PlayController extends Controller{

	public void mp3(){
		Admin admin =  getSessionAttr(CommonlyRecord.SESSION_USER.name());
		int id = getParaToInt("id")==null?0:getParaToInt("id");
		UserFile userFile = UserFile.dao.findFirst("select * from `user_file` where user_id=? and id=?", admin.getId(),id);
		if(userFile != null){
			setAttr("url", userFile.getUrl());
			setAttr("title", userFile.getName());
		}
		render("mp3.ftl");
	}
}
